<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>分类</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="__ROOT__/static/home/js/shop/rem.js"></script>
    <script type="text/javascript" src="__ROOT__/static/home/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__ROOT__/static/plugins/layer.mobile-v2.0/layer_mobile/layer.js"></script>
    <script type="text/javascript" src="__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/base.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/page.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/all.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/loading.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/slick/slick.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/goodscats.css"/>
    <script type="text/javascript">
        $(window).load(function(){
            $(".loading").addClass("loader-chanage")
            $(".loading").fadeOut(300)
        })

    </script>
</head>
<!--loading页开始-->
<!--loading页结束-->
<body>
<!--header star-->
<header class="mui-bar mui-bar-nav" id="header">
    <a class="btn" href="javascript:history.go(-1)">
        <i class="iconfont icon-fanhui"></i>
    </a>
    <form action="{:url('home/Goodscats/searchGoods')}" method="post" class="goods_form">
        <div class="form_out">
            <div class="form_inner_left">
      <input type="text" name="goods_name" id="" value="" class="sch-txt left-input" placeholder="输入您要搜索的商品"/>
            </div>
            <div class="form_inner_right">
        <button type="submit" class="inner_right_btn">
        <i class="fdj iconfont icon-sousuo"></i>
         <!--搜索-->
        </button>
            </div>
        </div>
    </form>
</header>
<!--header △ end-->
<div  class="goodscats_fixed"  >
    <div  class="goodscats_header" >
        商品分类&nbsp;&nbsp;
        <span>▽</span>
    </div>
    <div  class="classification">
        <!-- 一级循环-->
        {volist  name="rows"  id="data"}
        <div class="cation_name" >
            {$data['type_name']}
        </div>
        {/volist}
    </div>
</div>
<div class="warp clearfloat">
    <!--cation star-->
    <div  class="goodscats_box">
       <div style="clear: both"></div>

        <div class="goodslist">
            <!-- 二级循环-->
            {volist  name="rows"  id="data" key="k"}
            <div  style="display: none;"
                class='goodslist_content' id='{$k}'>

                {volist  name="data['data']"  id="v"}
                    <div  class="second" {empty name="v['child']"}style="display: none;"{/empty}  >{$v['type_name']}</div>

                    {volist  name="v['child']"  id="b"  key='i' }
                    <div  class="goodsone" style="width: 50%;height:230px;float: left;margin-top: 5px" >
                    <div>
                        <a  href="{:url('home/Cart/goodsInfo',array('id'=>$b['id']))}" >
                           {if  condition='$i lt 3'}
                            <img  src="__ROOT__{$b['goods_url']}"  alt=""  style="width:90%;height:165px; "  />
                            {else /}
                            <img class="lazy" data-original="__ROOT__{$b['goods_url']}" src="__ROOT__/static/plugins/lazyload/grey.gif" alt=""  style="width:90%;height:165px; "  />
                            {/if}
                        </a>
                    </div>

                    <div  class="goodsinfo" style="width: 90%;height:38px;margin: 0 5%;overflow: hidden;">
                        <a  href="{:url('home/Cart/goodsInfo',array('id'=>$b['id']))}" >
                        {$b['goods_name']}
                        </a>
                    </div>
                    <div style="width: 100%" >
                    <div style="display: inline-block;width: 35%" >￥:{$b['goods_price']}</div>
                    <div  style="display: inline-block;width: 55%">
                        <a  href="{:url('home/Cart/goodsInfo',array('id'=>$b['id']))}"  >
                            商品详情</a>
                    </div>
                    </div>
                    </div>
                    {/volist}

                    <div style="clear: both"></div>
                {/volist}
            </div>
            {/volist}
        </div>
    </div>
    <!--cation end-->
</div>

<!--footer star-->
<footer class="page-footer fixed-footer" id="footer">
    <ul>
        <li>
            <a href="{:url('home/Index/index')}">
                <i class="iconfont icon-shouye"></i>
                <p>首页</p>
            </a>
        </li>
        <li class="active">
            <a href="{:url('home/Goodscats/goodsCatsList')}">
                <i class="iconfont icon-icon04"></i>
                <p>分类</p>
            </a>
        </li>
        <li>
            <a href="javascript:;"   onclick="seeCart()">
                <i class="iconfont icon-gouwuche"></i>
                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="{:url('home/Userinfo/index')}">
                <i class="iconfont icon-yonghuming"></i>
                <p>个人中心</p>
            </a>
        </li>
    </ul>
</footer>
<!--footer end-->
</body>
<script>
    $(function () {
        $("img.lazy").lazyload();
    });

    //查看购物车
    function seeCart(){
        $.post("{:url('home/Cart/seeCart')}",function(data){
            if( data >0){
                window.location.href="{:url('home/Cart/cartList')}";
            }else if( data==-1){
                layer.open({content: '请先登录用户',skin: 'msg',time: 3 });
                setTimeout('window.location.href="{:url(\'home/login/login\')}"',3000);
            }

        })
    }
</script>
<script src="__ROOT__/static/home/js/shop/goodscats.js" type="text/javascript" ></script>
</html>
